/***********************************************************************************************************************************
 *    Name: Suspect.sql
 *  Author: Frank Figearo — http://www.sqlnerd.me/ — frank@sqlnerd.me
 * Summary: http://support.managed.com/kb/a398/how-to-repair-a-suspect-database-in-mssql.aspx
**/
EXECUTE sp_resetstatus [YourDatabase];
ALTER DATABASE [YourDatabase] SET EMERGENCY;
DBCC CHECKDB([YourDatabase]);
ALTER DATABASE [YourDatabase] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DBCC CHECKDB ([YourDatabase], REPAIR_ALLOW_DATA_LOSS);
ALTER DATABASE [YourDatabase] SET MULTI_USER;
GO